Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: 3주차 과제 - ReactHookForm,BoilerTemplate,Refactor(Jeff) #3

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

TransparentDeveloper
Copy link

@TransparentDeveloper TransparentDeveloper commented Mar 23, 2024

[진행사항]

  • React Hook Form & Yup 실습
  • 나만의 보일러 템플릿 만들기
  • 스파게티 코드 리펙터링 해보기

@TransparentDeveloper TransparentDeveloper self-assigned this Mar 23, 2024
Copy link

@snkchan snkchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰남겼습니다!~~이번주도 고생하셧습니다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boiler-template이기때문에 불필요한 파일은 삭제 요청드립니다..

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util-css에는 styled-components사용을 대비해서 작성해주셨는데 그렇다면 globalStyle파일과 해당 globalStyle을 main.tsx에 적용시킨 부분도 준비돼있으면 어떨까합니다

className={tailwindMerge(
SizeVariants[scale],
'flex items-center gap-2 h-12 p-1 border-2 rounded-sm border-gray-500 focus-within:border-green-500',
)}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'flex items-center gap-2 h-12 p-1 border-2 rounded-sm border-gray-500 focus-within:border-green-500'
이부분은

에공통으로 적용될 부분인거같은데 merge를통해 뒤에 작성하기보다는
cva를사용하는 방법이 어떨까요?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍😱👍

Comment on lines +10 to +24
const { dataList: postList } = useFetchDataListAndPagination({
endpoints: FETCH_POINT_DATA_LIST.POST,
take: 20,
limit: 10
})
const { onOpenConfirm } = useDialog()

const onClickPost = async (postId) => {
onOpenConfirm('정말로 페이지를 이동하겠습니까', () => {
onOpenConfirm('정말로 이동해버린다요!', () => {
navigate(`/post-detail/${postId}`), onCloseDialog()
})
})
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readme에 작성된 dataList요청이 늦어질때 화면에 아무것도 보이지않는 오류가있다는것을 봤었는데
view가 그려지기전에 !dataList라면 return 해주는 코드를 추가해주면 해결되지 않을가요?
아니면 useFectchDataListAndPagination에서 [isLoading,setIsLoading] = useState()선언해주시고

 const asyncFetching = async () => {
    try{
    setIsloading(false)
   ...{fetching}
  }
  }
  catch(error){
    ... {error일때 처리}
    }
   finally{
   setIsLoading(true)
   }

이런식으로도 해결할 수 있을거 같습니다.
react-query사용했을때처럼 말이죠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants